<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateFamilyUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('family_users', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->default('0')->comment('用户');
            $table->string('name')->default('')->comment('姓名');
            $table->integer('sex')->default('0')->nullable()->comment('性别');
            $table->integer('age')->default('0')->nullable()->comment('年龄');
            $table->integer('identity')->default('0')->nullable()->comment('身份');
            $table->string('phone')->nullable()->comment('手机号');
            $table->string('idcard')->nullable()->comment('身份证号');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('family_users');
    }
}
